package com.hxc.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface ReportMapper {
    // @Select("select ")
    //@MapKey("jobs")  加不加都行，如果报错是mybatis的误报
    List<Map<String, Object>> getRmpCountByJob();

    List<Map> getRmpCountByGender();

    List<Map> getStudentCountByDegree();
    //@MapKey("name")
    @Select("select c.name name,count(*) num from student s left join clazz c on s.clazz_id=c.id group by s.clazz_id order by num;")
    List<Map<String, Object>> getStudentCountByClazz();
}
